package me.zhengjie.dto.sqlServer;

import lombok.Data;
import cn.hutool.core.bean.BeanUtil;
import io.swagger.annotations.ApiModelProperty;
import cn.hutool.core.bean.copier.CopyOptions;
import javax.persistence.*;
import java.sql.Timestamp;
import java.io.Serializable;

/**
* @website https://eladmin.vip
* @description /
* @author zhangYY
* @date 2024-01-12
**/
@Entity
@Data
@Table(name="out_bound_mission_history")
public class OutBoundMissionHistory implements Serializable {

    @Id
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    @Column(name = "`id`")
    @ApiModelProperty(value = "id")
    private Integer id;

    @Column(name = "`mission_code`")
    @ApiModelProperty(value = "missionCode")
    private String missionCode;

    @Column(name = "`pallet_code`")
    @ApiModelProperty(value = "palletCode")
    private String palletCode;

    @Column(name = "`mission_status`")
    @ApiModelProperty(value = "missionStatus")
    private String missionStatus;

    @Column(name = "`source`")
    @ApiModelProperty(value = "source")
    private String source;

    @Column(name = "`destination`")
    @ApiModelProperty(value = "destination")
    private String destination;

    @Column(name = "`create_time`")
    @ApiModelProperty(value = "createTime")
    private Timestamp createTime;

    @Column(name = "`start_time`")
    @ApiModelProperty(value = "startTime")
    private Timestamp startTime;

    @Column(name = "`finish_time`")
    @ApiModelProperty(value = "finishTime")
    private Timestamp finishTime;

    public void copy(OutBoundMissionHistory source){
        BeanUtil.copyProperties(source,this, CopyOptions.create().setIgnoreNullValue(true));
    }
}
